.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
}
.video-wrapper iframe,
.video-wrapper object,
.video-wrapper embed,
.video-wrapper .display-youtube-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.video-placeholder-loader {
  min-height: 540px;
  display: flex;
  align-items: center;
}

.display-youtube-video {
  display: block;
}

.hide-youtube-video {
  display: none;
}

.video-quiz-options {
  background-color: var(--primary-background);
  display: flex;
  flex-direction: column;
}

/* remove bootstrap margin and center the radio buttons */
.video-quiz-options > label {
  margin: 0;
  align-items: center;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--quaternary-background) var(--secondary-background);
}

.video-quiz-options > label::-webkit-scrollbar {
  height: 15px;
}

.video-quiz-options > label::-webkit-scrollbar-track {
  background: var(--secondary-background);
}
.video-quiz-options > label::-webkit-scrollbar-thumb {
  background-color: var(--quaternary-background);
}

.video-quiz-option-label {
  padding: 20px;
  cursor: pointer;
  display: flex;
  font-weight: normal;
}

.video-quiz-input-visible {
  margin-inline-end: 15px;
  position: relative;
  top: 2px;
  display: inline-block;
  min-width: 20px;
  min-height: 20px;
  max-width: 20px;
  max-height: 20px;
  border-radius: 50%;
  background-color: var(--secondary-background);
  border: 2px solid var(--primary-color);
}

input:focus-visible + .video-quiz-input-visible {
  outline: 3px solid var(--focus-outline-color);
  outline-offset: 2px;
}

.video-quiz-selected-input {
  width: 10px;
  height: 10px;
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: var(--primary-color);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

/* remove bootstrap properties */
.video-quiz-option > p {
  margin: 0;
}

/* remove bootstrap properties */
.video-quiz-option > pre {
  padding: 0;
  margin: 0;
  /* remove default prism background */
  background: none;
}

.mcq-option-row {
  /* Use grid so we can align the speaking button to the option content row only */
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto; /* row1 = option content, row2 = feedback */
  gap: 0 1rem;
  border-left: 4px solid var(--tertiary-background);
  border-right: 4px solid var(--tertiary-background);
  border-top: 2px solid var(--tertiary-background);
  border-bottom: 2px solid var(--tertiary-background);
}

.mcq-option-row:first-child {
  border-top: 4px solid var(--tertiary-background);
}

.mcq-option-row:last-child {
  border-bottom: 4px solid var(--tertiary-background);
}

.mcq-option-row:has(.mcq-correct) {
  border-left-color: var(--success-background);
}

.mcq-option-row:has(.mcq-incorrect) {
  border-left-color: var(--danger-background);
}

.mcq-option-with-feedback {
  display: contents;
}

.mcq-option-content {
  display: block;
  grid-column: 1;
  grid-row: 1;
}

.mcq-option-label {
  display: flex;
  align-items: center;
  margin: 0;
  flex: 1;
}

.mcq-correct {
  color: var(--success-color);
  border-left-color: var(--success-background);
}

.mcq-incorrect {
  color: var(--danger-color);
  border-left-color: var(--danger-background);
}

.mcq-hide-border {
  border-bottom: none;
}

.mcq-speaking-button-wrapper {
  grid-column: 2;
  /* place the button in the same grid row as the option content */
  grid-row: 1;
  display: flex;
  align-items: center; /* vertically center the button within the option content row */
  justify-content: center;
  padding-inline-end: 20px;
}

/* ensure feedback occupies the second grid row */
.mcq-feedback {
  grid-column: 1;
  grid-row: 2;
  border-top: none;
  display: block;
}

.mcq-prism-correct code {
  color: var(--success-color);
}

.mcq-prism-incorrect code {
  color: var(--danger-color);
}

/* Override the default styles of `legend` element */
.mcq-question-text {
  border: none;
  color: var(--primary-color);
  margin: 0;
}
